package com.devilvan.betrice.lol.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Evad.Wu
 * @Description LOL-红蓝色方 枚举类
 * @date 2022-10-03
 */
@Getter
@AllArgsConstructor
@SuppressWarnings(value = "unused")
public enum LolBattleTeamConstant {
    /**
     * 蓝色方
     */
    BLUE(100, "蓝色方"),
    /**
     * 红色方
     */
    RED(200, "红色方");

    /**
     * 编码
     */
    private final Integer code;
    /**
     * 描述
     */
    private final String desc;

    public static String getDescByCode(Integer code) {
        LolBattleTeamConstant[] values = LolBattleTeamConstant.values();
        for (LolBattleTeamConstant value : values) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
}
